Localizing Dates, Times, and Metric Information
Localizing Dates, Times, and Metric Information
You can obtain a string corresponding to a date or time by passing the long
integer you get from the operating-system GetDateTime procedure to the
IUDateString or IUTimeString procedure. These procedures get the
localized information to format the data from the 'itl0' resource or 'itl1'
resource. The IULDateString and IULTimeString routines take a date
specified as a LongDateTime type and return formatted strings. These two
routines have not been previously documented in Inside Macintosh. For
interfaces to IULDateString and IULTimeString, see the
International Utilities Package Data. See Macintosh Worldwide
Development: Guide to System Software for comprehensive details on the
IULDateString and IULTimeString routines.
With the IUDatePString, IUTimePString, IULDateString, and
IULTimeString routines, you explicitly specify the handle of an
international resource that contains the format information. The IUMetric
function lets you find out whether the metric system is to be used.
IUDateString Fills out a string representing a short, abbreviated, or
long form of the date corresponding to the long integer
date returned by GetDateTime
IUDatePString Fills out a string representing a date corresponding to
the long integer date returned by GetDateTime by
using format information from the specified resource
IULDateString Takes a date specified in a LongDateTime format and
returns a short date, abbreviated date, or long date as a
string formatted according to the specified international
resource
IUTimeString Takes a long integer time returned by GetDateTime
and returns a formatted string
IUTimePString Takes a long integer time returned by GetDateTime
and returns a string formatted according to the specified
international resource
IULTimeString Takes a time specified in a LongDateTime format and
returns a string formatted according to the specified
international resource
IUMetric Indicates whether or not the metric system is to be
used